home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1986-07-15 | 537 b | 18 lines |
- DEFINITION MODULE Sort;
-
- FROM SortElemType IMPORT ElemType, compare;
-
- (* Module SortElemType is used to define the kind of element to be sorted *)
-
- EXPORT QUALIFIED Qsort;
-
- PROCEDURE Qsort (VAR A: ARRAY OF ElemType; N: CARDINAL);
- (* input: - array of pointers to elements, and number of elements
- * [ N <= HIGH(A)+1 ].
- * output: - the array of pointers is re-arranged so they point to the
- * elements in sorted order.
- * requires that ElemType has a total order relation named "compare".
- *)
-
- END Sort.